<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<link rel="stylesheet" type="text/css" href="../../../Themes/default/easyui.css">
		<link rel="stylesheet" type="text/css" href="../../../Themes/icon.css">
		<link rel="stylesheet" type="text/css" href="../../../CSS/demo.css">
		<link rel="stylesheet" type="text/css" href="../../../CSS/common.css">
		<link rel="stylesheet" type="text/css" href="../../../CSS/print.css">
		<script type="text/javascript" src="../../../JS/jquery.min.js"></script>
		<script type="text/javascript" src="../../../JS/jquery.easyui.min.js"></script>
		<script type="text/javascript" src="../../../JS/common.js"></script>
		<script type="text/javascript" src="../../../JS/SHA-1.js"></script>
		<script type="text/javascript" src="../../../JS/finance.js"></script>
	</head>

	<body>
		<div class="div_print_info_portait">
			<h1 align="center">绵阳市高水农副产品批发有限公司配送中心</h1>
			<h1 align="center">收费单据</h1>
			<form id="ff" method="post" style="width:95%">
				<table cellspacing="4" style="margin-top: 10px;margin-left: 0px;margin-bottom: 10px;">
					<tr>
						<th>单据编号</th>
						<td>
							<input type="text" name="ORDER_NO" class="print_text_style" />
						</td>
					</tr>
				</table>
				<table class="altrowstable printtable" style="text-align: left;">
					<tr>
						<th width="15%">商户姓名</th>
						<td width="35%">
							<input style="width: 100%;" type="text" name="TENANT_NAME" id="input_TENANT_NAME" class="print_text_style" />
						</td>
						<th width="15%">身份证号码</th>
						<td width="35%">
							<input style="width: 100%" type="text" name="IDCARD" id="input_IDCARD" class="print_text_style" />
						</td>
					</tr>
				</table>
				<table id="OrderInforTableOne" class="altrowstable printtable" style="margin-top: 0px;text-align: center;">
					<tr>
						<th>
							<div name="CHARGETYPE_NAME">收费类型</div>
						</th>
						<th>
							<div name="COST">费用</div>
						</th>
						<th>
							<div name="STARTTIME">起始时间</div>
						</th>
						<th>
							<div name="ENDTIME">结束时间</div>
						</th>
						<th>
							<div name="PERIOD">时间期限</div>
						</th>
					</tr>
				</table>
				<table class="altrowstable printtable" style="margin-top: 0px;">
				     <tr>
				     	<th width="36%">人民币金额合计（小写）</th>
				     	<td width="64%" id="xx"></td>
				     </tr>
				     <tr>
				     	<th>人民币金额合计（大写）</th>
				     	<td id="dx"></td>
				     </tr>
				</table>
				<div style="float: left;margin-left: 10px;">付款人：<span></span></div>
				<div style="position: absolute;left:570px">收款人：<span></span></div>
			</form>
		</div>
	</body>
	<script type="text/javascript">
		var id = getID();
		$(document).ready(function(){
		loadRemote();
		});

		function loadRemote() {
			$.ajax({
				type: "get",
				url: RemoteLinkAddress + '/market/charge/findbyid.do?ID=' + id,
				dataType: "json",
				success: function(result) {
					$('#ff').form('load', result);
					var _num = result.COST;
					_num = parseFloat(_num);
					$("#xx").html(_num)
					var num = changeMoneyToChinese(_num);
					$("#dx").html(num);
					var newTd = new Array();
					var _data = result.rows;
					for(var i = 0; i < _data.length; i++) {
						var newTr = OrderInforTableOne.insertRow();
						newTd[0] = newTr.insertCell()
						if(_data[i].CHARGETYPE_NAME != undefined)
							newTd[0].innerText = _data[i].CHARGETYPE_NAME;

						newTd[1] = newTr.insertCell();
						if(_data[i].COST != undefined)
							newTd[1].innerText = _data[i].COST;

						newTd[2] = newTr.insertCell();
						if(_data[i].STARTTIME != undefined)
							newTd[2].innerText = _data[i].STARTTIME;

						newTd[3] = newTr.insertCell();
						if(_data[i].ENDTIME != undefined)
							newTd[3].innerText = _data[i].ENDTIME;

						newTd[4] = newTr.insertCell();
						if(_data[i].PERIOD != undefined)
							newTd[4].innerText = _data[i].PERIOD;
					}

				}
			});
		}
	</script>

</html>